import { createRouter, createWebHashHistory } from "vue-router";
import { routes as staticRoutes } from "./routes";

/**
 * 创建路由
 */
const router = createRouter({
  history: createWebHashHistory(),
  // routes: constantRoutes as RouteRecordRaw[],
  routes: staticRoutes,
  // 刷新时，滚动条位置还原
  scrollBehavior: () => ({ left: 0, top: 0 }),
});

export default router;
